<?PHP

	class tpl_managelang {
		
		public static function managelang(){
		
			$langs = '';
			$class = 'td2';
			foreach($GLOBALS['OUTPUT']->langs as $langname=>$lang_info){
				
				$link = base64_encode($langname);
				
				if($GLOBALS['OUTPUT']->settings['default_lang'] == $langname){
					$links = "[{$GLOBALS['LANG']->lang_admin->default}]";
				}else{
					$links = <<<EOV
<a href='./index.php?act=admin&page=managelang{$GLOBALS['OUTPUT']->ses}&makedefault=$link'>[{$GLOBALS['LANG']->lang_admin->makedefault}]</a>
<a href='./index.php?act=admin&page=managelang{$GLOBALS['OUTPUT']->ses}&delete=$link'>[{$GLOBALS['LANG']->lang_admin->delete}]</a>
EOV;
				}
				
				$langs .= <<<EOV
<tr>
	<td class='$class' width='70%'>{$langname}</td>
	<td class='$class' width='30%'>{$links}</td>
</tr>
EOV;
				$class = ($class == 'td2' ? 'td1' : 'td2');
			}
			
			return	tpl_globals::header() .
				<<<EOV
<div class='table_header'>&nbsp;{$GLOBALS['LANG']->lang_admin->managelang}</div>
<table style='width: 100%;' cellspacing='1' cellpadding='5'>
	<tr>
		<td class='table_header_row' width='70%'>{$GLOBALS['LANG']->lang_admin->languagename}</td>
		<td class='table_header_row' width='30%'>{$GLOBALS['LANG']->lang_admin->action}</td>
	</tr>
	{$langs}
</table>
EOV
.
			tpl_globals::footer();
				
		}
		
	}

?>